/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2020, LomboTech Co.Ltd.
 * Author: lomboswer <lomboswer@lombotech.com>
 *
 * Support raph init for lombo platforms
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 */

#if !defined(__LOMBO_INIT__)
#define __LOMBO_INIT__

#include "img_types.h"
#include "pvrsrv_error.h"
#include "pvrsrv_device.h"
#include "servicesext.h"
#include <linux/platform_device.h>

struct lombo_context {
	PVRSRV_DEVICE_CONFIG	*dev_config;
	struct clk      *bus_gating;
	struct clk      *bus_reset;
	struct clk      *axi_clk;
	struct clk	*core_clk;
	struct clk	*parent_clk;
	unsigned int	clk_rate;

	void __iomem	*topbase;
	void __iomem	*membase;

	resource_size_t topstart;
	resource_size_t memstart;
	resource_size_t clkstart;
};

IMG_HANDLE RgxLomboInit(PVRSRV_DEVICE_CONFIG *psDevConfig);
void RgxLomboDeinit(IMG_HANDLE hSysData);
PVRSRV_ERROR RgxLomboPrePowerState(IMG_HANDLE hSysData,
				   PVRSRV_DEV_POWER_STATE eNewPowerState,
				   PVRSRV_DEV_POWER_STATE eCurrentPowerState,
				   IMG_BOOL bForced);
PVRSRV_ERROR RgxLomboPostPowerState(IMG_HANDLE hSysData,
				    PVRSRV_DEV_POWER_STATE eNewPowerState,
				    PVRSRV_DEV_POWER_STATE eCurrentPowerState,
				    IMG_BOOL bForced);
#endif	/* __LOMBO_INIT__ */

